﻿#region Librerias

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

#endregion


namespace ESF.General.Text
{
	[Serializable]
	[DataContract]
	public class FileRegisterValidatorSet
	{
		[DataMember]
		public int? ID { set; get; }
		
		
		[DataMember]
		public string Name { set; get; }


		[DataMember]
		public string Version { set; get; }


		[DataMember]
		public char Separator { set; get; }

		
		[DataMember]
		public List<FileRegisterValidator> Validators { set; get; }


		[DataMember]
		public string BaseFileName { set; get; }


		[DataMember]
		public string FileNameRegularExpression { set; get; }


		[IgnoreDataMember]
		public Encoding Encoding { get { return Encoding.GetEncoding (CodePage); } } 


		[DataMember]
		public int CodePage { set; get; }


		[DataMember]
		public bool RequiresCMS { set; get; }


		[DataMember]
		public bool RequiresDigitalCertificate { set; get; }


		[DataMember]
		public bool OptionalDigitalCertificate { set; get; }


		[DataMember]
		public string [] Features { set; get; }


		[DataMember]
		public string [] AcceptedExtensions { set; get; }


		[DataMember]
		public bool ValidateTextData { set; get; }


		[DataMember]
		public List<KeyValuePair<int, string []>> OnlyNameAllowedValues { set; get; }
		
		
		[DataMember]
		public List<KeyValuePair<string, int>> OnlyDatePortions { set; get; }

		[IgnoreDataMember]
		public string [] DatePortionNames;


		[DataMember]
		public int FileMaxLengthBytes { set; get; }


		[DataMember]
		public bool RequiresEnterpriseIdentificationInFile { set; get; }
	}
}
